interface IWithLength {
    length: number
}

function echoWithLength<T extends IWithLength>(arg: T): T {
    console.log(arg.length )
    return arg
}

echoWithLength("sarsdr")
echoWithLength({length:10,width:10})
echoWithLength([1,2,3])
